import useUserStore from "@/store/modules/user"

export function getMpLogin() {
  const userStore = useUserStore()
	// #ifdef MP-WEIXIN
	if (!userStore?.user?.phone) { // 手机号未授权
		uni.showModal({
			title: '提示',
			content: '是否前往登录？',
			success: function (res) {
				if (res.confirm) {
					uni.navigateTo({
						url: '/pages/login/login'
					})
				}
			}
		})
		return false
	}
	// #endif
	return true
}
